import { GTabBar } from "../../../../../com/mui/controls/GTabBar";
import { GBoxDirection } from "../../../../../com/mui/containers/globalVariable/GBoxDirection";
//class SpecialActiveTabBar
    
    export  class SpecialActiveTabBar extends GTabBar
    {
        constructor()
        {
            super();
            return;
        }

        protected /* override */ resetPosition(): void
        {
            var loc1=0;
            var loc4=null;
            var loc2=0;
            var loc3=this.numChildren;
            if (this.direction != GBoxDirection.VERTICAL) 
            {
                if (this.direction == GBoxDirection.HORIZONTAL) 
                {
                    loc1 = 0;
                    while (loc1 < loc3) 
                    {
                        (loc4 = this.getChildAt(loc1)).x = loc2 + horizontalGap;
                        loc4.y = 0;
                        loc2 = loc4.x + loc4.width;
                        ++loc1;
                    }
                }
            }
            else 
            {
                loc1 = 0;
                while (loc1 < loc3) 
                {
                    (loc4 = this.getChildAt(loc1)).x = 17;
                    loc4.y = loc2 + verticalGap;
                    if (loc1 == 0) 
                    {
                        loc4.y = loc4.y + 5;
                    }
                    loc2 = loc4.y + loc4.height;
                    ++loc1;
                }
            }
            return;
        }

        public /* override */ get height(): number
        {
            var loc1=0;
            var loc3=null;
            var loc4=0;
            var loc2=numChildren;
            while (loc1 < loc2) 
            {
                loc3 = this.getChildAt(loc1);
                loc4 = loc4 + (loc3.height + verticalGap);
                ++loc1;
            }
            return loc4 + 5;
        }
    }
